//===--- Diagnostic.def - Modula-2 Diagnostic Messages ----------*- C++ -*-===//
//
// Part of the M2Lang Project, under the Apache License v2.0 with
// LLVM Exceptions. See LICENSE file for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef DIAG
#define DIAG(ID, Level, Msg)
#endif

DIAG(err_unterminated_block_comment, Error, "unterminated (* comment")
DIAG(err_unterminated_char_or_string, Error, "missing terminating character")
DIAG(err_hex_digit_in_decimal, Error, "decimal number contains hex digit")

DIAG(err_expected, Error, "expected {0} but found {1}")
DIAG(err_module_identifier_not_equal, Error, "module identifier at begin and end not equal")
DIAG(note_module_identifier_declaration, Note, "module identifier declared here")
DIAG(err_proc_identifier_not_equal, Error, "procedure identifier at begin and end not equal")
DIAG(note_proc_identifier_declaration, Note, "procedure identifier declared here")

DIAG(err_symbold_declared, Error, "symbol {0} already declared")
DIAG(err_types_for_operator_not_compatible, Error, "types not compatible for operator {0}")
DIAG(err_undeclared_name, Error, "undeclared name {0}")
DIAG(err_if_expr_must_be_bool, Error, "expression of IF statement must have type BOOLEAN")
DIAG(err_while_expr_must_be_bool, Error, "expression of IF statement must have type BOOLEAN")
DIAG(err_vardecl_requires_type, Error, "variable declaration requires type")
DIAG(err_returntype_must_be_type, Error, "return type of function must be declared type")
DIAG(err_function_call_on_nonfunction, Error, "function call requires a function")
DIAG(err_procedure_call_on_nonprocedure, Error, "procedure call requires a procedure")
DIAG(err_wrong_number_of_parameters, Error, "wrong number of parameters")
DIAG(err_type_of_formal_and_actual_parameter_not_compatible, Error, "type of formal and actual parameter are not compatible")
DIAG(err_var_parameter_requires_var, Error, "VAR parameter requires variable as argument")
DIAG(warn_ambigous_negation, Warning, "Negation is ambigous. Please consider using parenthesis.")
DIAG(err_function_requires_return, Error, "Function requires RETURN with value")
DIAG(err_procedure_requires_empty_return, Error, "Procedure does not allow RETURN with value")
DIAG(err_function_and_return_type, Error, "Type of RETURN value is not compatible with function type")

DIAG(err_not_yet_implemented, Error, "module imports are not yet implemented")
#undef DIAG